package cn.iocoder.yudao.module.tms.controller.admin.orderfollowlog.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import cn.iocoder.yudao.module.tms.enums.ClearanceStatusEnum;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 订单跟进日志创建/修改 Request VO")
@Data
public class OrderFollowLogSaveReqVO {

    @Schema(description = "主键", example = "29274")
    private Long id;

    @Schema(description = "关联的公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22380")
    @NotNull(message = "关联的公司ID不能为空")
    private Long companyId;

    @Schema(description = "关联的订单ID（关联tms_order表的id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "16167")
    @NotNull(message = "关联的订单ID（关联tms_order表的id）不能为空")
    private Long orderId;

    @Schema(description = "跟进时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "跟进时间不能为空")
    private LocalDateTime followTime;

    @Schema(description = "跟进人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "跟进人不能为空")
    private String follower;

    @Schema(description = "跟进内容（沟通记录/进展描述等）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "跟进内容（沟通记录/进展描述等）不能为空")
    private String followContent;

    @Schema(description = "处理状态", example = "ISF_DECLARATION")
    private ClearanceStatusEnum processStatus;
    
    @Schema(description = "附件列表")
    private List<String> attachments;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class FollowLogAttachment {
        @Schema(description = "附件名称", requiredMode = Schema.RequiredMode.REQUIRED)
        private String attachmentName;

        @Schema(description = "附件URL", requiredMode = Schema.RequiredMode.REQUIRED)
        private String attachmentUrl;

        @Schema(description = "附件类型", requiredMode = Schema.RequiredMode.REQUIRED)
        private String attachmentType;
    }

}